package javase.day05;

import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;

/**
 * 
 *写文本文件
	 *使用PrintWriter 提供了println()方法
 *
 */
public class Demo3 {
	public static void main(String[] args) throws IOException{
		String file = "text.txt";
		PrintWriter out = new PrintWriter(new OutputStreamWriter(new FileOutputStream(file),"gbk"));
		out.println("Hi,");
		out.println("你的，jerry");
		out.close();
		IOUtils.print(file);
	}
}
